package lab03.test02;

import java.io.File;

public class Test02 {
    public static void main(String[] args) {
        File file =new File("D:\\");
        file.listFiles();
        for (File a:file.listFiles()){
            if (a.isDirectory()){
                System.out.println("目录："+a.getName());
            }
            if (a.isFile()){
                System.out.println("文件："+a.getName());
            }
        }
    }
}
